# the minimum version of cmake
cmake_minimum_required(VERSION 3.1)

# set the project name
project(CHelper VERSION 1.0)

# top path
set(TOP_DIR ${CMAKE_CURRENT_LIST_DIR})

# set CHelper output path
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/output/bin)

# set cxx flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -std=c++14 -fPIC")

# export compile commands
set(CMAKE_EXPORT_COMPILE_COMMANDS on)

# include library config
include(cmake/glogConfig.cmake)
include(cmake/gtestConfig.cmake)
include(cmake/benchmarkConfig.cmake)

# include src CMakeLists.txt                            
add_subdirectory(src)

#unit test
if(ENABLE_TESTCASES)
    add_subdirectory(tests)
endif()

add_subdirectory(benchmark)